package com.jingdianjichi.subject.common.enums;

import lombok.Getter;

/**
 * IsDeletedFlag   删除状态枚举
 *
 * @author 86178
 * @version 2024/03/17 21:03
 **/
@Getter
public enum IsDeletedFlagEnum {

    DELETED(1, "已删除"),
    UN_DELETED(0, "未删除");

    public int code;

    public String description;

    IsDeletedFlagEnum(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public static IsDeletedFlagEnum getByCode(int codeVal) {
        for (IsDeletedFlagEnum resultCodeEnum : IsDeletedFlagEnum.values()) {
            if (resultCodeEnum.code == codeVal) {
                return resultCodeEnum;
            }
        }
        return null;
    }
}

